﻿
namespace KlearTweet.Client.Panels
{
    public partial class DiagnosticPanel
    {
        public DiagnosticPanel()
        {
            InitializeComponent();

            Infrastructure.EventLogger.Updated += (s, e)
                => Infrastructure.ThreadPoolHelper.RunOnMainThread(UpdateLog);
        }

        public void UpdateLog()
        {
            if (Visibility == System.Windows.Visibility.Visible)
                Log.Text = Infrastructure.EventLogger.Log.ToString();
        }
    }
}
